package net.yxsoft.controller.pc.sysmgt.common.validator;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

/**
 * Created by 刘飞 on 2017/5/5.
 */
public class LoginValidator extends Validator {
 /**
 * @MethodName: validate
 * @Description:
 * @param: c
 * @return void
 * @throws
 * @date 2023/8/31 15:36
 * @author jhf
 */
    protected void validate(Controller c) {
        setShortCircuit(true);


        validateRequired("loginId", "adminNameMsg", "账号不能为空");

        validateRequired("loginIds", "passwordMsg", "密码不能为空");
        validateCaptcha("captcha", "captchaMsg", "验证码不正确");
    }
 /**
 * @MethodName: handleError
 * @Description:
 * @param: c
 * @return void
 * @throws
 * @date 2023/8/31 15:36
 * @author jhf
 */
    protected void handleError(Controller c) {
        c.renderJson();
    }
}

